extends layouts/layout

block content
  div(class="index-main")
    div(class="f-becenter loading") WELCOME TO ASSEMBLE
    h1(class="f-becenter glowIn") 欢迎来到vue自定义组件库！
    img(class="f-becenter index-img" src="/image/welcome.gif")
    script(type='text/javascript').
        "use strict";
        var loading = document.querySelector( ".loading" );
        var letters = loading.textContent.split( "" );
        loading.textContent = "";
        letters.forEach( function ( letter , i ) {
            var span = document.createElement( "span" );
            span.textContent = letter;
            span.style.animationDelay = i / 10 + "s";
            loading.append( span );
        } );
    script(type='text/javascript').
        let glowInTexts = document.querySelectorAll( ".glowIn" );
        glowInTexts.forEach( (glowInText) => {
            let letters = glowInText.textContent.split( "" );
            glowInText.textContent = "";
            letters.forEach( (letter, i) => {
                let span = document.createElement( "span" );
                span.textContent = letter;
                span.style.animationDelay = `${ i * 0.05 }s`;
                glowInText.append( span );
            });
        });
        setTimeout(() => {
        window.location.pathname = '/assemble'
        }, 5000);

